Copying only the specified CR Number content from one attribute to the other attribute

Hi ,

I need to copy the attribute content  value say 'applied CR' to the attribute ''New applied CR'

But I should copy the content only specific to particular CR i.e if the CR-363 and the content in the attribute 'applied CR' is CR-363: Shri CR-464: John , then if it should copy the contents of the particular CR-363: Shri to the attribute 'New applied CR' .

Imp: It should not copy the CR-464: John to the attribute 'New applied CR'.

Any help very much appreciated.

As of now my coding copies all the content  from the attribute 'applied CR' to the attribute 'New applied CR' but it should not copy all the contents.

Thanks,

Shri


KBSri - Thu Oct 24 08:10:25 EDT 2013

Re: Copying only the specified CR Number content from one attribute to the other attribute
KBSri - Mon Oct 28 01:42:40 EDT 2013

Can anyone please help me out?

Re: Copying only the specified CR Number content from one attribute to the other attribute
GregM_dxler - Mon Oct 28 10:00:45 EDT 2013

KBSri - Mon Oct 28 01:42:40 EDT 2013

Can anyone please help me out?

Sounds like you need to use a regular expression.  We do something similar, but have each entry in the applied CR column as a separate line, which makes it easier to loop through all entries.  We also use a script to do the change, so the user must be entering the CR number anyway.  So, maybe you want all entries with the same "CR-363:" with anyone's name at the end?  Here is a little dxl to use a regular expression.  Maybe this will give you some help.

Object o = current
string s = o."_CR number" ""
Regexp reTest = regexp2 "(CR-)([0-9]+)(:\\ )([a-zA-Z]+)"
while (reTest s) {
   print "Found match" " match=" s[match 0] "**\n"
   s = s[end 0:]
}
 

Hope it helps,

Greg